﻿<Application
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:SampleData="clr-namespace:Expression.Blend.SampleData.SampleProgramInfo"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:SampleData1="clr-namespace:Expression.Blend.SampleData.MainPageSampleData" xmlns:SampleData2="clr-namespace:Expression.Blend.SampleData.SettingsPageSampleData" xmlns:SampleData3="clr-namespace:Expression.Blend.SampleData.ProgramPageSampleData" xmlns:SampleData4="clr-namespace:Expression.Blend.SampleData.ProgramListPageSampleData"
             xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=Microsoft.Phone"
             xmlns:Data="clr-namespace:Samples.Radio.Data"
             xmlns:SampleData6="clr-namespace:Expression.Blend.SampleData.PlaylistPageSampleData"
             xmlns:SampleData7="clr-namespace:Expression.Blend.SampleData.PodcastPageSampleData"
             x:Class="Samples.Radio.App"
             mc:Ignorable="d"
             >

    <!--Application Resources-->
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
            	<ResourceDictionary Source="Resources\StyleResources.xaml" />
            	<ResourceDictionary Source="Resources\StringResources.xaml" />
            	<ResourceDictionary Source="Configuration.xaml" />
            </ResourceDictionary.MergedDictionaries>
            
        	<SampleData7:PodcastPageSampleData x:Key="PodcastPageSampleData" d:IsDataSource="True"/>
            
        	<SampleData6:PlaylistPageSampleData x:Key="PlaylistPageSampleData" d:IsDataSource="True"/>

            <uriMapper:UriMapper x:Key="UriMapper">
                <uriMapper:UriMapping Uri="/{Page}Page/{Program}"
                                      MappedUri="/Pages/{Page}/{Page}Page.xaml?ProgramName={Program}" />
                <uriMapper:UriMapping Uri="/{Page}Page"
                                      MappedUri="/Pages/{Page}/{Page}Page.xaml" />
                <uriMapper:UriMapping Uri="/{etc}"
                                      MappedUri="/{etc}" />
            </uriMapper:UriMapper>
            
            
        	<SampleData2:SettingsPageSampleData x:Key="SettingsPageSampleData" d:IsDataSource="True"/>
        	<SampleData3:ProgramPageSampleData x:Key="ProgramPageSampleData" d:IsDataSource="True"/>
        	<SampleData4:ProgramListPageSampleData x:Key="ProgramListPageSampleData" d:IsDataSource="True"/>
        	<SampleData1:MainPageSampleData x:Key="MainPageSampleData" d:IsDataSource="True"/>
        	<SampleData:SampleProgramInfo x:Key="SampleProgramInfo"
        		d:IsDataSource="True" />

            <Data:ViewModelLocator x:Key="Locator"
                                   Configuration="{StaticResource Configuration}" />
        </ResourceDictionary>
    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
    	<shell:PhoneApplicationService Launching="Application_Launching"
    		Closing="Application_Closing"
    		Activated="Application_Activated"
    		Deactivated="Application_Deactivated" />
    </Application.ApplicationLifetimeObjects>

</Application>